<template>
	<view>
		<view style="text-align: left;font-size: 0.9rem;color: #424242;margin-left: 1rem;margin-top: 1rem;">
			{{info.createdAt}}
		</view>
		<view style="margin-top: 1rem;">
			<text style="margin-left: 1rem;">{{info.message}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					message: ''
				}
			}
		},
		onLoad(val) {
			this.id = val.id
		},
		mounted() {
			this.loadData()
		},
		methods: {
			async loadData() {
				const param = {
					Id: this.id
				};
				const res = await this.$request.get('/system/notification-user/queryByKey', param);

				if (res.code === 200) {
					const data = res.data.info;
					const notification = data.notification;
					delete data.notification; // 删除嵌套的notification对象

					// 将data和notification合并为一个新对象
					this.info = Object.assign({}, data, notification);
				}
			},
		}
	}
</script>

<style>

</style>